{include file="public/header" /}
<div id="dcWrap">
    <!--包含公共模版-->
    {include file="public/lefter" /}
    <div id="dcMain">
        <!-- 当前位置 -->
        <div id="urHere"><a>管理中心</a><b>></b><strong>单页面列表</strong></div>
        <div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
            <h3><!-- <a href="{ :url('page/add')}" class="actionBtn">添加单页</a> -->单页面列表</h3>

            <div class="page">
                {volist name="pages" id="page"}
                <dl>
                    <dt><strong>{$page.name}</strong>
                    <p>{$page.ename}</p></dt>
                    <dd><a href="{:url('page/edit',['id' => $page['id']])}">编 辑</a> | <a class="del" data-id="{$page['id']}" data-name="{$page['name']}">删 除</a></dd>
                </dl>
                {/volist}
            </div>
        </div>
    </div>
    <div class="clear"></div>
    {include file="public/footer" /}
    <div class="clear"></div>
</div>
<script type="text/javascript">
    //删除
   $(".del").click(function(){
        var id= $(this).data('id');
        var name = $(this).data('name');
        var $this = $(this).parents('dl');
        confirms('','是否确认删除【'+ name +'】栏目？','',function(){
            $.get("{:url('page/dele')}",{id:id},function(data){
               layer.msg(data.msg,{time: 1000}, function(){
                  if (data.status == 1) {
                    $this.remove();
                    parent.reload_category();
                  }
                });
            },'json');
        }); 
    })
</script>
</body>
</html>